import java.util.Random;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextInt()) {
            int seed = scanner.nextInt(); //输入随机数种子
            Random random = new Random(seed); //用随机种子进行随机算法
            System.out.println(random.nextInt(6) + 1); //随机生成1-6地数字
        }
    }

}
